package com.zhengyao;

import com.zhengyao.service.GreetingService2;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;

/**
 * @author : zhengyao3@郑瑶
 * @date : 2020/7/24 10:02
 * @Description: 接口实现类
 */
@Service
public class GreetingService2Impl implements GreetingService2 {

    @Override
    public String sayHello(String name) {

        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "Hello GreetingService2" + name + " " + RpcContext.getContext().getAttachment("ip");
    }
}
